﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Warranty.Model.Interface;
using Warranty.Model.Model;
using Common.Util;

namespace Warranty.Provider
{
    public class AddWMSinpLogProvider : GenericProvider, IAddWMSinpLogProvider
    {
        public List<AddWMSinpLog> SearchAddWMSinpLogs(string serialNumber)
        {
            var query = repository.GetQuery<AddWMSinpLog>();
            if (!serialNumber.IsNullOrWhiteSpace())
                query = query.Where(x => x.LotSet.ToUpper() == serialNumber.ToUpper());
            return query.ToList();
        }
    }
}
